package com.dckeji.shiplock.webapp.conf;

import com.alibaba.druid.filter.logging.Log4jFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created with IntelliJ IDEA.
 * User: TianWei
 * Date: 2017/8/1
 * Time: 10:13
 */
@Configuration
public class LogConfig {

    @Bean
    public Log4jFilter log4jFilter() {
        Log4jFilter log4jFilter = new Log4jFilter();
        log4jFilter.setResultSetLogEnabled(true);
        log4jFilter.setStatementExecutableSqlLogEnable(true);
        return log4jFilter;
    }


}
